<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
</head>

<body>
    <div id="info"></div>
    <script src="./jquery.js"></script>
    <script src="./template-web.js"></script>
    <script type="text/html" id="user-tpl">
        <ul>
            <li>{{name}}</li>
            <li>{{age}}</li>
            <li>{{gender}}</li>
        </ul>
    </script>
    <script>
        $(function() {
            var userInfo = {
                name: "ww",
                age: 22,
                gender: "男"
            };
            var ret = template("user-tpl", userInfo);
            $("#info").html(ret);
        });
    </script>
</body>

</html>